const express = require('express')
const userCtr = require('../controller/user')
const userValidate = require('../validator/user')

const router = express.Router()

router.post('/register', userValidate.register, userCtr.register)

router.post('/login', userValidate.login, userCtr.login)

router.get('/users', userCtr.currentUser)

router.get('/:username/', userCtr.findUser)

module.exports = router
